package com.google.memoryofaplace.model;

import java.util.Date;

import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class TBPlaceComments {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	@Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value = "true")
	private String encodedKey;

	@Persistent
	@Extension(vendorName = "datanucleus", key = "gae.pk-id", value = "true")
	private Long codPlaceComment;

	@Persistent
	private String user;

	@Persistent
	private String comment;

	@Persistent
	private int commentType;

	@Persistent
	private Date creation;
	

	public TBPlaceComments(String user, String comment, int commentType) {
		super();
		this.creation = new Date();
		this.user = user;
		this.comment = comment;
		this.commentType = commentType;		
	}


	public void setEncodedKey(String encodedKey) {
		this.encodedKey = encodedKey;
	}


	public String getEncodedKey() {
		return encodedKey;
	}


	public void setUser(String user) {
		this.user = user;
	}


	public String getUser() {
		return user;
	}


	public void setComment(String comment) {
		this.comment = comment;
	}


	public String getComment() {
		return comment;
	}


	public void setCommentType(int commentType) {
		this.commentType = commentType;
	}


	public int getCommentType() {
		return commentType;
	}


	public void setCreation(Date creation) {
		this.creation = creation;
	}


	public Date getCreation() {
		return creation;
	}


	public void setCodPlaceComment(Long codPlaceComment) {
		this.codPlaceComment = codPlaceComment;
	}


	public Long getCodPlaceComment() {
		return codPlaceComment;
	}


}
